/*
 * UnitFinishedEvent.h
 *
 *  Created on: Oct 14, 2008
 *      Author: Ryan
 */

#ifndef UNITFINISHEDEVENT_H_
#define UNITFINISHEDEVENT_H_

#include "GameEvent.h"

#include <sstream>

namespace OOInterface
{

class UnitFinishedEvent: public OOInterface::GameEvent
{
public:
	UnitFinishedEvent( ConstUnitPtr unit ) : _unit(unit) {}
	virtual ~UnitFinishedEvent() {}

	ConstUnitPtr getUnit() const { return _unit; }

	virtual std::string toString() const
	{
		std::ostringstream str;
		str << "Event: Unit Finished. ( " << _unit->getName() << " )";

		return str.str();
	}

private:
	ConstUnitPtr _unit;
};

}

#endif /* UNITFINISHEDEVENT_H_ */
